<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="icon" href="favicon.ico">
    <title>gateway report - lamb</title>
    <link type="text/css" rel="stylesheet" href="/css/bootstrap.min.css">
    <link type="text/css" rel="stylesheet" href="/css/bootstrap-theme.min.css">
    <link type="text/css" rel="stylesheet" href="/css/bootstrap-datetimepicker.min.css">
    <link type="text/css" rel="stylesheet" href="/css/gateway.css">
  </head>
  <body>
    <div class="navbar navbar-default">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand">
            <img alt="Brand" src="/img/logo.png" width="32" height="32" style="margin-top:-6px" />
          </a>
          <a class="navbar-brand">lamb</a>
        </div>
        <div id="navbar" class="collapse navbar-collapse">
          <ul class="nav navbar-nav">
            <li><a href="/status/inbound">状态监控</a></li>
            <li><a href="/company">企业管理</a></li>
            <li><a href="/account">帐号管理</a></li>
            <li><a href="/template">签名模板</a></li>
            <li class="dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button">路由管理</a>
              <ul class="dropdown-menu">
                <li><a href="/routing">上行路由</a></li>
                <li><a href="/delivery">下行路由</a></li>
              </ul>
            </li>
            <li class="dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button">通道管理</a>
              <ul class="dropdown-menu">
                <li><a href="/gateway">落地通道</a></li>
                <li><a href="/gateway/report">通道数据统计</a></li>
                <li><a href="/gateway/check">通道测试</a></li>
              </ul>
            </li>
            <li class="dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button">数据记录</a>
              <ul class="dropdown-menu">
                <li><a href="/message">上行短信</a></li>
                <li><a href="/message/deliver">下行短信</a></li>
                <li><a href="/message/statistic">数据统计</a></li>
              </ul>
            </li>
            <li class="dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button">系统管理</a>
              <ul class="dropdown-menu">
                <li><a href="/keyword">关键词库</a></li>
                <li><a href="/payment/logs">充值记录</a></li>
                <li><a href="/service/core">服务状态</a></li>
              </ul>
            </li>
          </ul>
          <ul class="nav navbar-nav navbar-right">
            <li><a href="/logout"><span class="glyphicon glyphicon-log-out"></span> 退 出</a></li>
          </ul>
        </div>
      </div>
    </div>
    <div class="container">
      <div class="row">
        <ol class="breadcrumb">
          <li><a href="#">Home</a></li>
          <li><a href="/gateway">Gateway</a></li>
          <li class="active">Report</li>
          <li class="pull-right help"><span class="glyphicon glyphicon-question-sign"></span> <a href="#">帮助信息</a></li>
        </ol>
      </div>
      <div class="row statistics">
        <form id="where" class="form-inline">
          <div class="form-group">
            <label>时间范围 : </label>
            <input type="text" id="begin" class="form-control" style="width:165px" name="begin" />
          </div>
          -
          <div class="form-group">
            <input type="text" id="end" class="form-control" style="width:165px" name="end" />
          </div>
          <div class="form-group">
            <p class="text-muted help"><span class="glyphicon glyphicon-info-sign"></span> 网关数据统计最小查询时间为一天，无数据通道将不被显示</p>
          </div>
          <button type="button" class="btn btn-success btn-sm pull-right" onclick="formQuery()">查 询</button>
        </form>
      </div>
      <hr />
      <div class="row contents">
        <table class="table table-hover">
          <thead>
            <tr><th>#</th><th>通道名称</th><th>发送数量</th><th>DELIVRD</th><th>EXPIRED</th><th>DELETED</th><th>UNDELIV</th><th>ACCEPTD</th><th>UNKNOWN</th><th>REJECTD</th></tr>
          </thead>
          <tbody>
          </tbody>
        </table>
      </div>
    </div>
</div>
<script id="contents" type="text/template">
  {{#each data}}
  <tr>
    <td><span class="glyphicon glyphicon-globe"></span></td>
    <td>{{gid}}</td>
    <td>{{submit}}</td>
    <td>{{delivrd}}</td>
    <td>{{expired}}</td>
    <td>{{deleted}}</td>
    <td>{{undeliv}}</td>
    <td>{{acceptd}}</td>
    <td>{{unknown}}</td>
    <td>{{rejectd}}</td>
  </tr>
  {{/each}}
</script>
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<script type="text/javascript" src="/js/handlebars.min.js"></script>
<script type="text/javascript" src="/js/layer.js"></script>
<script type="text/javascript" src="/js/gateway.js"></script>
<script type="text/javascript">
  /* Startup initialization */
  $(document).ready(function(){
    $('li.dropdown').mouseover(function() {   
        $(this).addClass('open');
    }).mouseout(function() {
        $(this).removeClass('open');
    });

    $("#begin").val(getdateofday("08:00:00"));
    $("#end").val(getdateofday("23:00:00"));
  
    // datetimepicker
    $('#begin').datetimepicker({
        format: 'yyyy-mm-dd hh:ii:ss',
        language: 'zh-CN',
        autoclose: true
    });

    $('#end').datetimepicker({
        format: 'yyyy-mm-dd hh:ii:ss',
        language: 'zh-CN',
        autoclose: true
    });
  });
</script>
</body>
</html>
